import Book from "./book";
import Person from "./person";

export default async () => {
    Person.hasMany(Book, {
        foreignKey: "userId",
        as: "books"
    });
    Book.belongsTo(Person, {
        foreignKey: "userId",
        as: "person"
    });
    await Person.sync();
    await Book.sync();
};
